import logging

from sqlmodel import Session
import sys
sys.path.append('/workspace/练习/queqiaohui/backend/')
from app.core.db import engine, init_db


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


async def init() -> None:
    with Session(engine) as session:
        await init_db(session)


async def main() -> None:
    logger.info("Creating initial data")
    await init()
    logger.info("Initial data created")


if __name__ == "__main__":
    import asyncio

    asyncio.run(main())
